// //channel
const channel = (r) =>
  require.ensure([], () => r(require("../page/channel/index")), "zp");
const home = (r) =>
  require.ensure([], () => r(require("../page/channel/home")), "zw");
const member = (r) =>
  require.ensure([], () => r(require("../page/channel/member")), "zw");

const channelList = (r) =>
  require.ensure([], () => r(require("../page/channel/channelList")), "zp");
const channelTwo = (r) =>
  require.ensure([], () => r(require("../page/channel/channelTwo")), "zw");
const orderList = (r) =>
  require.ensure([], () => r(require("../page/channel/orderList")), "zp");
const portalQr = (r) =>
  require.ensure([], () => r(require("../page/channel/portalQr")), "zp");

const me = (r) =>
  require.ensure([], () => r(require("../page/channel/me")), "zw");

export default {
  path: "/channel",
  component: channel,
  children: [
    {
      path: "/channel/home",
      component: home,
      meta: { title: "统计信息", isChannel: true },
    },
    {
      path: "/channel/member",
      component: member,
      meta: { title: "我的会员", isChannel: true },
    },
    {
      path: "/channel/channelList",
      component: channelList,
      meta: { title: "我的团队", isChannel: true },
    },
    {
      path: "/channel/channelTwo",
      component: channelTwo,
      meta: {
        title(to) {
          return "我的下级渠道";
        },
        isChannel: true,
      },
    },
    {
      path: "/channel/doctorList",
      component: orderList,
      meta: {
        title(to) {
          return "订单列表";
        },
        isChannel: true,
      },
    },
    {
      path: "/channel/portalQr",
      component: portalQr,
      meta: { title: "我的专属二维码", isChannel: true },
    },
    {
      path: "/channel/me",
      component: me,
      meta: { title: "个人中心", isChannel: true },
    },
  ],
};
